import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class Code9_25_2 {
    public static int[] shake(){
        Random random = new Random();
        int[] arr = new int[6];
        for (int i = 0; i < 6; i++) {
            arr[i] = random.nextInt(33)+1;
            out:
            for (int j = 0; j <i; j++) {
                if (arr[i] == arr[j]){
                    arr[i] = random.nextInt(33)+1;
                    continue out;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
        return arr;
    }
    public static int[] writeNumber(){
        int[] red = new int[6];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < red.length; i++) {
            System.out.println("请输入第"+(i+1)+"红色球号码");
            red[i] = scanner.nextInt();
        }
        return red;
    }
    public static int blueMyself(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("最后再输出蓝色球号码");
        return scanner.nextInt();
    }
    public static int redComparison(int[] arrMyself,int[] arrRandom){
        int count = 0;
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j <6 ; j++) {
                if (arrRandom[i] == arrMyself[j]){
                    count++;
                }else {
                    continue;
                }
            }
        }
        return count;
    }
    public static int blueComparison(int myBlue,int blueRandom){
        if (myBlue==blueRandom){
            return 1;
        }else {
            return 0;
        }
    }
    public static void finalResult(int redCount,int blueCount){
        if (redCount==6&&blueCount==1){
            System.out.println("一等奖，1000万");
        }else if(redCount==6&&blueCount==0){
            System.out.println("二等奖，200万");
        } else if (redCount==5&&blueCount==1) {
            System.out.println("三等将，3000块");
        } else if ((redCount==5&&blueCount==0)||(redCount==4&&blueCount==1)) {
            System.out.println("四等奖，200块");
        } else if ((redCount==4&&blueCount==0)||(redCount==3&&blueCount==1)||(redCount==2&&blueCount==1)) {
            System.out.println("五等奖，10块");
        }else if((redCount==1&&blueCount==1)||(redCount==0&&blueCount==1)){
            System.out.println("六等奖,5块");
        }else {
            System.out.println("没奖");
        }
    }
    public static void main(String[] args) {
        Random random = new Random();
        int[] arrRandom = shake();
        int blueRandom = random.nextInt(16)+1;


        int[] arrMyself = writeNumber();
        int myBlue = blueMyself();

        int redCount = redComparison(arrMyself,arrRandom);
        int blueCount = blueComparison(myBlue,blueRandom);

        finalResult(redCount,blueCount);

    }

    public static void main4(String[] args) {
        out:
        for (int i = 100; i <= 200; i++) {
            boolean flag = true;
            for (int j = 2; j <= i/2; j++) {
                if (i%j == 0){
                    continue out;
                }
            }
                System.out.println(i);
        }
    }
}
/*    public static void main3(String[] args) {
        //100以内找素数的三种方法
    private static void receiveRed(int[] arr){
        Random random = new Random();
        int len = arr.length;
    while (len!=0){
        int j =1;
        System.out.println("是否开始抽红包1/0");
        Scanner scanner = new Scanner(System.in);
        int put = scanner.nextInt();
        if (put == 0){
            return;
        }else if(put != 0 && put != 1){
            System.out.println("重新输入");
            continue;
        }
        int ch = random.nextInt(len)-j+1;
        System.out.println("第"+j+"次抽到了" + arr[ch]);
        j++;
        for (int i = ch; i < len-1; i++) {
            arr[i] = arr[i+1];
        }
        len--;
    }
    }
    public static void main2(String[] args) {
        int[] arr = {9,666,188,520,99999};
        receiveRed(arr);
        System.out.println("结束抽奖活动");
    }
    public static void ad(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (arr[i]+5)%10;
        }
        int left = 0;
        int right = arr.length-1;
        while (left<right){
            int temp = 0;
            temp = arr[left];
            arr[left] = arr[right];
            arr[right] = temp;
            left++;
            right--;
        }
    }
    public static int[] arraySplitting(int num){
        //判断有多少位数
        int count = 0;
        int n = num;
        while(n!=0){
            n /= 10;
            count++;
        }
        int[] arr = new int[count];
        for (int i = 0; i < count; i++) {
            int ch = (int)(num/Math.pow(10.0,(double) (count-1-i)));
            arr[i] = ch;
            num = (int)(num%Math.pow(10.0,(double) (count-1-i)));
        }
        return arr;
    }
    public static void main1(String[] args) {
        //数字加密
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        //把数字拆分开来，然后放入数组中；
        int[] arr = arraySplitting(num);
        ad(arr);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] +" ");
        }
    }*/

